﻿using System;
using System.Collections;


namespace Apple
{
    class Program
    {
        static void Main(string[] args)
        {
            SortedList sortedList = new SortedList();
            sortedList.Add(1, "苹果");
            sortedList.Add(2, "雪梨");
            sortedList.Add(3, "西瓜");
            sortedList.Add(4, "香蕉");
            sortedList.Add(5, "奥利给");
            Console.WriteLine("买点啥？");
            foreach (DictionaryEntry entry in sortedList)
            {
                int key = (int)entry.Key;
                string value = entry.Value.ToString();
                Console.WriteLine("{0},{1}", key, value);
            }
            int chose = int.Parse(Console.ReadLine());
            bool flag = sortedList.ContainsKey(chose);
            if (flag)
            {
                Console.WriteLine("好的先生，请这边付钱");
            }
            else { Console.WriteLine("我们没这水果"); }
        }
    }
}
